package com.zhuoyue.common.utils;

/**
 * 随机数工具类
 * @author Administrator
 */
public class RandomUtil {
    /**
     * 获取随机数的个数
     *
     * @param count
     * @return
     */
    public static String getStrHexRandom(int count) {
        StringBuilder stringBuilder = new StringBuilder();
        for (int i = 0; i < count; i++) {
            String[] temp = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"};
            int index = (int) (Math.random() * temp.length);
            stringBuilder.append(temp[index]);
        }
        return stringBuilder.toString();
    }
}
